1. Field of the Invention
The present invention relates to the field of embedded systems, and more particularly to a system and method for loading and updating firmware on an embedded device.
2. Description of the Related Art
Many types of devices include non-volatile memory which stores program instructions that are executed after power is applied or upon reset. These program instructions typically perform various initialization functions and then initiate loading and execution of other software such as operating system software. Typically, the initialization program instructions are referred to as “firmware” and were, in the past, stored in either ROM (read-only memory) or EPROM (electrically programmable read-only memory). However, using ROM or EPROM devices to store the firmware had several drawbacks. One such drawback was that to install new or different versions of firmware, there was the need for physical replacement of a ROM device or manipulation such as irradiating an EPROM device with ultraviolet light and then using an EPROM programmer to store new firmware on the EPROM device.
When electrically erasable programmable read only memory (EEPROM) devices became available years ago, EEPROM devices were often used instead of ROM or EPROM devices to store firmware because of the drawbacks discussed above. New firmware could be installed without the need for physical replacement or manipulation. At first, there were some drawbacks to using EEPROMs. One such drawback was that the entire storage of an EEPROM had to be rewritten to update the firmware. In other words, a portion of the EEPROM could not be written to specifically. This left the firmware updating procedure vulnerable to power failures or other errors (e.g., software bugs) in the firmware itself. If the firmware had an error, it could render the device or computer system non-operational. Often, a physical replacement of the EEPROM device was required if an error occurred in the firmware.
Currently, versions of EEPROMs are available where it is possible to update a portion of the EEPROM without updating the entire EEPROM. This type of EEPROM can be found in flash memory cards for digital cameras, among other devices, and is also used to store firmware for devices and computer systems.
However, even with individually updatable portions of EEPROMs, often, especially in embedded devices, in updating firmware on the device, the entire firmware is replaced. Thus, prior art methods for updating firmware in non-volatile memory, such as EEPROMs, may still include the drawbacks related to errors in the firmware as noted above, e.g., power failures, software bugs, etc., interrupting the upgrade process, and thus rendering the device inoperable, and so a physical replacement of the EEPROM may be required.
In some networked systems, such as Universal Serial Bus (USB) based systems, devices on the network are uniquely identified to a host device via a process referred to as enumeration, whereby the host device determines the capabilities of the devices and appropriate drivers for the devices. Generally, a device on the network is enumerated upon power-up, upon coupling to the network, and upon reset of the device. In many systems, the enumeration may take a substantial amount of time to perform.
In prior art systems, whenever firmware is updated, a re-enumeration of the device is generally required, and the enumeration is generally not performable until the firmware update process is complete. In other words, prior art firmware and firmware updating techniques do not facilitate enumerating the device concurrently with performing other functions. For example, when the device is an embedded device, the enumeration functionality is included in the firmware. If the firmware is updated, the firmware is executed again, and so the enumeration functionality is generally executed again. Such re-enumerating of the device requires additional time, which may not be desired and/or within a tolerance of time transpiring in the system of computers and/or other devices.
Thus, there is a need for a robust system and method that overcomes various current limitations of updating or replacing firmware on a device.